import http from "../axios/request";
//看商品
export const getproduct = () =>
  http.get("/product/get_product", {
    params: {
      category_id: "20210827165510715",
    },
  });

//下单
export const preorder = (product_id, quantity) =>
  http.post("/order/pre_order", {
    product_id,
    quantity,
  });

//支付
export const payment = (order_id) =>
  http.post("/pay/payment", {
    order_id,
  });
//订单状态
export const orderstatus = (order_id) =>
  http.get("/order/query_order_status", {
    params: {
      order_id,
    },
  });
//订单详情
export const getorder = (order_id = "") =>
  http.post("/order/get_order", { order_id });
